package homework;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class Work2 {

	public static void main(String[] args) {
		String urlName = "www.baidu.com";
		try {
			InetAddress[] hosts = InetAddress.getAllByName(urlName);
			for (InetAddress host : hosts) {
				System.out.println(host.getHostAddress());
			}
		} catch (UnknownHostException e) {
			e.printStackTrace();
		}
	}
}
